<template>
    <div class="container">container</div>
</template>

<!-- <script setup>
 //组合式API下的生命周期函数
import { onBeforeMount,onMounted } from 'vue';
onBeforeMount(()=>{
    console.log('Dom元素渲染前',document.querySelector('.container'));
})
onMounted(()=>{
    console.log('Dom元素渲染后',document.querySelector('.container'));
})

</script> -->

<script>
//选项式API的生命周期函数
export default{
    data(){
        return{
            value:'Hello'
        }
    },
    beforeCreate(){
        console.log('实例对象创建前:'+this.value);
    },created(){
        console.log('实例对象创建hou:'+this.value);

    }
}
</script>